<?php

include_once("../model/Model.php");
$comment = $_POST['textarea5'];
$title = $_POST['imageTitle'];
$privacy = $_POST['Radio14'];
$category = $_POST['imagetestinput'];
if($title == "")
{
	$title = $_FILES['imageFile']['name'];
}
$filename = $_FILES['imageFile']['name'];
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION)); 

$model = new Model();
$ans = $model->imageFileUpload(urlencode($comment),urlencode($title),$ext,$privacy,$category);

echo  "<script>top.imageUploadComplete('".$ans."','".$title."','".$comment."','".$filename."','".$privacy."','".$category."');</script>";


?>
